import 'package:flutter/material.dart';

class DailProductPage extends StatelessWidget {
  final List products;
  DailProductPage({Key key,@required this.products}):super(key:key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: Text("每日上新")),
        body: Center(
                child: RaisedButton(
                  // child: Text("返回"),
                  child: ListView.builder(
                    itemCount:products.length,
                    itemBuilder: (context,index){
                      return ListTile(
                         title:Text(products[index].title),
                          onTap:(){
                            Navigator.pop(context,'返回了一些内容');
                            print('点击了');
                          }
                      );
                    },
                  ),
                  onPressed: () {
                
                  },
                )
            )
    );
  }
}
